package JDBC;

import java.sql.*;

public class Example01{
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/student?characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai", "root", "新的密码");
        Statement stmt = conn.createStatement();//Student是数据库名
        String sql = "UPDATE account SET id=7 WHERE money=1000.00";
        int rs = stmt.executeUpdate(sql);
    }
}
